﻿using System.Runtime.Serialization;
using VideoStore.Common.Response.Interface;

namespace VideoStore.Common.Response
{
    /// <summary>
    /// The Message class is used to represent messages sent from the service layer.
    /// </summary>
    [DataContract]
    public class Message : IMessage
    {
        #region Fields

        /// <summary>
        /// Name of the message.
        /// </summary>
        [DataMember]
        public string Name { get; set; }

        /// <summary>
        /// Description of the message.
        /// </summary>
        [DataMember]
        public string Description { get; set; }

        #endregion

        #region Constructor

        /// <summary>
        /// Default Constuctor
        /// </summary>
        public Message()
        {
            Name = string.Empty;
            Description = string.Empty;
        }

        /// <summary>
        /// Message constructor
        /// </summary>
        /// <param name="name">Name of the Message</param>
        public Message(string name)
        {
            Name = name;
        }

        /// <summary>
        /// Message Constructor
        /// </summary>
        /// <param name="name">Name of the message</param>
        /// <param name="description">Description of the message</param>
        public Message(string name, string description)
            : this(name)
        {
            Description = description;
        }

        #endregion
    }
}